from statistics import mode
from appointment_app import models

# 用户 查询 预约的 历史检测任务
def query_order_history(user_uuid):
    res = models.user_check_task.objects.filter(user_uuid=user_uuid).all()
    return res


# 根据task_uuid 查询单个检测任务
def query_order_task(uuid):
    res = models.user_check_task.objects.filter(uuid=uuid).first()
    return res


# 预约检测任务
def order_group_check(formData):
    res = models.user_check_task.objects.create(**formData)
    return res
